package conf

import (
	"github.com/caarlos0/env/v6"
)

var global *Config

func C() *Config {
	if global == nil {
		panic("load config first")
		// fmt.Println("load config first")
	}

	return global
}

func LoadConfigFromEnv() error {

	global = NewDefaultConfig()
	return env.Parse(global)
}
